<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: moving_average_filter&lt; T &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dd/d92/classmoving__average__filter.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="../../dd/d62/classmoving__average__filter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">moving_average_filter&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Inheritance diagram for moving_average_filter&lt; T &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d6/da1/classmoving__average__filter__inherit__graph.png" border="0" usemap="#moving__average__filter_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="moving__average__filter_3_01_t_01_4_inherit__map" id="moving__average__filter_3_01_t_01_4_inherit__map">
</map>
</div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Collaboration diagram for moving_average_filter&lt; T &gt;:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/d72/classmoving__average__filter__coll__graph.png" border="0" usemap="#moving__average__filter_3_01_t_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="moving__average__filter_3_01_t_01_4_coll__map" id="moving__average__filter_3_01_t_01_4_coll__map">
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4739031729f16ed05fbcccefc54d0fea"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#a4739031729f16ed05fbcccefc54d0fea">moving_average_filter</a> (int num_data)</td></tr>
<tr class="separator:a4739031729f16ed05fbcccefc54d0fea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5f14f8a1f5956618ca9810b71d89e53"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#ab5f14f8a1f5956618ca9810b71d89e53">~moving_average_filter</a> ()</td></tr>
<tr class="separator:ab5f14f8a1f5956618ca9810b71d89e53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6b966b495bc94bb14e93d2e7ba3087b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#ae6b966b495bc94bb14e93d2e7ba3087b">input</a> (T input_value)</td></tr>
<tr class="separator:ae6b966b495bc94bb14e93d2e7ba3087b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a0b021785036599da926954a02024a2"><td class="memItemLeft" align="right" valign="top">virtual T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#a7a0b021785036599da926954a02024a2">output</a> (void)</td></tr>
<tr class="separator:a7a0b021785036599da926954a02024a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2b6e828e52260af67a503c8adfea845"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#ad2b6e828e52260af67a503c8adfea845">clear</a> (void)</td></tr>
<tr class="separator:ad2b6e828e52260af67a503c8adfea845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classfilter"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classfilter')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../db/db7/classfilter.html">filter&lt; T &gt;</a></td></tr>
<tr class="memitem:a1acf714cdea22d29c669fb14840f97a2 inherit pub_methods_classfilter"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/db7/classfilter.html#a1acf714cdea22d29c669fb14840f97a2">filter</a> (void)</td></tr>
<tr class="separator:a1acf714cdea22d29c669fb14840f97a2 inherit pub_methods_classfilter"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0be0ee0b051f2bb824623a11545b662a inherit pub_methods_classfilter"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/db7/classfilter.html#a0be0ee0b051f2bb824623a11545b662a">~filter</a> (void)</td></tr>
<tr class="separator:a0be0ee0b051f2bb824623a11545b662a inherit pub_methods_classfilter"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a06244e526cf7055af3b61e58dcd70b0f"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a></td></tr>
<tr class="separator:a06244e526cf7055af3b61e58dcd70b0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3e3083e6df0ba201164009fc1d6ef44"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a></td></tr>
<tr class="separator:ac3e3083e6df0ba201164009fc1d6ef44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7762e621954a41799bb35ca50b8ca62b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">idx_</a></td></tr>
<tr class="separator:a7762e621954a41799bb35ca50b8ca62b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2779b048b0351ec376c6e6badd6a2711"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">sum_</a></td></tr>
<tr class="separator:a2779b048b0351ec376c6e6badd6a2711"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class moving_average_filter&lt; T &gt;</h3>


<p>Definition at line <a class="el" href="../../dc/ddd/filters_8h_source.html#l00049">49</a> of file <a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4739031729f16ed05fbcccefc54d0fea"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::<a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/de4/filters_8cpp_source.html#l00010">10</a> of file <a class="el" href="../../dc/de4/filters_8cpp_source.html">filters.cpp</a>.</p>

<p>References <a class="el" href="../../dc/ddd/filters_8h_source.html#l00058">moving_average_filter&lt; T &gt;::buffer_</a>, and <a class="el" href="../../dc/ddd/filters_8h_source.html#l00059">moving_average_filter&lt; T &gt;::num_data_</a>.</p>
<div class="fragment"><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    : <a class="code" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a>(num_data), <a class="code" href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">idx_</a>(0), <a class="code" href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">sum_</a>(0.0) {</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;  <a class="code" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a> = <span class="keyword">new</span> T[<a class="code" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a>];</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  memset((<span class="keywordtype">void</span> *)<a class="code" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a>, 0.0, <span class="keyword">sizeof</span>(T) * <a class="code" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a>);</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;}</div><div class="ttc" id="classmoving__average__filter_html_a2779b048b0351ec376c6e6badd6a2711"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">moving_average_filter::sum_</a></div><div class="ttdeci">T sum_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00061">filters.h:61</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_ac3e3083e6df0ba201164009fc1d6ef44"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">moving_average_filter::num_data_</a></div><div class="ttdeci">int num_data_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00059">filters.h:59</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_a06244e526cf7055af3b61e58dcd70b0f"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">moving_average_filter::buffer_</a></div><div class="ttdeci">T * buffer_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00058">filters.h:58</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_a7762e621954a41799bb35ca50b8ca62b"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">moving_average_filter::idx_</a></div><div class="ttdeci">int idx_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00060">filters.h:60</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab5f14f8a1f5956618ca9810b71d89e53"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::~<a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/de4/filters_8cpp_source.html#l00037">37</a> of file <a class="el" href="../../dc/de4/filters_8cpp_source.html">filters.cpp</a>.</p>

<p>References <a class="el" href="../../dc/ddd/filters_8h_source.html#l00058">moving_average_filter&lt; T &gt;::buffer_</a>.</p>
<div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                                                 {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keyword">delete</span>[] <a class="code" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;}</div><div class="ttc" id="classmoving__average__filter_html_a06244e526cf7055af3b61e58dcd70b0f"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">moving_average_filter::buffer_</a></div><div class="ttdeci">T * buffer_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00058">filters.h:58</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad2b6e828e52260af67a503c8adfea845"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::clear </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="../../db/db7/classfilter.html#ae0e36e8992fc55acceddc7b02a2a711a">filter&lt; T &gt;</a>.</p>

<p>Definition at line <a class="el" href="../../dc/de4/filters_8cpp_source.html#l00031">31</a> of file <a class="el" href="../../dc/de4/filters_8cpp_source.html">filters.cpp</a>.</p>

<p>References <a class="el" href="../../dc/ddd/filters_8h_source.html#l00058">moving_average_filter&lt; T &gt;::buffer_</a>, <a class="el" href="../../dc/ddd/filters_8h_source.html#l00059">moving_average_filter&lt; T &gt;::num_data_</a>, and <a class="el" href="../../dc/ddd/filters_8h_source.html#l00061">moving_average_filter&lt; T &gt;::sum_</a>.</p>
<div class="fragment"><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                                         {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <a class="code" href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">sum_</a> = 0.0;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  memset((<span class="keywordtype">void</span> *)<a class="code" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a>, 0.0, <span class="keyword">sizeof</span>(T) * <a class="code" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a>);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;}</div><div class="ttc" id="classmoving__average__filter_html_a2779b048b0351ec376c6e6badd6a2711"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">moving_average_filter::sum_</a></div><div class="ttdeci">T sum_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00061">filters.h:61</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_ac3e3083e6df0ba201164009fc1d6ef44"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">moving_average_filter::num_data_</a></div><div class="ttdeci">int num_data_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00059">filters.h:59</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_a06244e526cf7055af3b61e58dcd70b0f"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">moving_average_filter::buffer_</a></div><div class="ttdeci">T * buffer_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00058">filters.h:58</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../dd/d92/classmoving__average__filter_ad2b6e828e52260af67a503c8adfea845_icgraph.png" border="0" usemap="#dd/d92/classmoving__average__filter_ad2b6e828e52260af67a503c8adfea845_icgraph" alt=""/></div>
<map name="dd/d92/classmoving__average__filter_ad2b6e828e52260af67a503c8adfea845_icgraph" id="dd/d92/classmoving__average__filter_ad2b6e828e52260af67a503c8adfea845_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae6b966b495bc94bb14e93d2e7ba3087b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::input </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>input_value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="../../db/db7/classfilter.html#a968cd36e3cca3fb8541d4a57510aca4f">filter&lt; T &gt;</a>.</p>

<p>Definition at line <a class="el" href="../../dc/de4/filters_8cpp_source.html#l00017">17</a> of file <a class="el" href="../../dc/de4/filters_8cpp_source.html">filters.cpp</a>.</p>

<p>References <a class="el" href="../../dc/ddd/filters_8h_source.html#l00058">moving_average_filter&lt; T &gt;::buffer_</a>, <a class="el" href="../../dc/ddd/filters_8h_source.html#l00060">moving_average_filter&lt; T &gt;::idx_</a>, <a class="el" href="../../dc/ddd/filters_8h_source.html#l00059">moving_average_filter&lt; T &gt;::num_data_</a>, and <a class="el" href="../../dc/ddd/filters_8h_source.html#l00061">moving_average_filter&lt; T &gt;::sum_</a>.</p>
<div class="fragment"><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                                                  {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  <a class="code" href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">sum_</a> -= <a class="code" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a>[<a class="code" href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">idx_</a>];</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <a class="code" href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">sum_</a> += input_value;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  <a class="code" href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">buffer_</a>[<a class="code" href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">idx_</a>] = input_value;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  ++<a class="code" href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">idx_</a>;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <a class="code" href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">idx_</a> %= <a class="code" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a>;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;}</div><div class="ttc" id="classmoving__average__filter_html_a2779b048b0351ec376c6e6badd6a2711"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">moving_average_filter::sum_</a></div><div class="ttdeci">T sum_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00061">filters.h:61</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_ac3e3083e6df0ba201164009fc1d6ef44"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">moving_average_filter::num_data_</a></div><div class="ttdeci">int num_data_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00059">filters.h:59</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_a06244e526cf7055af3b61e58dcd70b0f"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a06244e526cf7055af3b61e58dcd70b0f">moving_average_filter::buffer_</a></div><div class="ttdeci">T * buffer_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00058">filters.h:58</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_a7762e621954a41799bb35ca50b8ca62b"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a7762e621954a41799bb35ca50b8ca62b">moving_average_filter::idx_</a></div><div class="ttdeci">int idx_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00060">filters.h:60</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7a0b021785036599da926954a02024a2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::output </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="../../db/db7/classfilter.html#a368417e744fae19145dc46bd878216e5">filter&lt; T &gt;</a>.</p>

<p>Definition at line <a class="el" href="../../dc/de4/filters_8cpp_source.html#l00026">26</a> of file <a class="el" href="../../dc/de4/filters_8cpp_source.html">filters.cpp</a>.</p>

<p>References <a class="el" href="../../dc/ddd/filters_8h_source.html#l00059">moving_average_filter&lt; T &gt;::num_data_</a>, and <a class="el" href="../../dc/ddd/filters_8h_source.html#l00061">moving_average_filter&lt; T &gt;::sum_</a>.</p>
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;                                   {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">sum_</a> / <a class="code" href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">num_data_</a>;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;}</div><div class="ttc" id="classmoving__average__filter_html_a2779b048b0351ec376c6e6badd6a2711"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#a2779b048b0351ec376c6e6badd6a2711">moving_average_filter::sum_</a></div><div class="ttdeci">T sum_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00061">filters.h:61</a></div></div>
<div class="ttc" id="classmoving__average__filter_html_ac3e3083e6df0ba201164009fc1d6ef44"><div class="ttname"><a href="../../dd/d92/classmoving__average__filter.html#ac3e3083e6df0ba201164009fc1d6ef44">moving_average_filter::num_data_</a></div><div class="ttdeci">int num_data_</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/ddd/filters_8h_source.html#l00059">filters.h:59</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a06244e526cf7055af3b61e58dcd70b0f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::buffer_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/ddd/filters_8h_source.html#l00058">58</a> of file <a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7762e621954a41799bb35ca50b8ca62b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::idx_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/ddd/filters_8h_source.html#l00060">60</a> of file <a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac3e3083e6df0ba201164009fc1d6ef44"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::num_data_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/ddd/filters_8h_source.html#l00059">59</a> of file <a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2779b048b0351ec376c6e6badd6a2711"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a>&lt; T &gt;::sum_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/ddd/filters_8h_source.html#l00061">61</a> of file <a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="../../dc/ddd/filters_8h_source.html">filters.h</a></li>
<li><a class="el" href="../../dc/de4/filters_8cpp_source.html">filters.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dd/d92/classmoving__average__filter.html">moving_average_filter</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
